<nav class="nav">
  <ul class="list list--nav">
    {% for item in site.html_pages %}
      {% unless item.title == false or item.url contains "/page" or item.url contains "/404.html" %}
        <li class="item  item--nav{% if item.url == page.url %}  item--current{% endif %}">

          {% if item.url contains '://' %}
            {% assign url = item.url %}
          {% else %}
            {% assign url = item.url | relative_url %}
          {% endif %}

          {% if item.collectionpage %}
            {% assign collectiondata = site.collections | where: "label", item.collectionpage | first %}
            <a href="{{ url }}">{{ collectiondata.title }}</a>
          {% else %}
            <a href="{{ url }}">{{ item.title }}</a>
          {% endif %}
        </li>
      {% endunless %}
    {% endfor %}
  </ul>
</nav>
